package com.weimob.mcloud.wechatwork.customer.service;

import com.weimob.mcloud.wechatwork.core.entity.privatesphere.PrivateSphere;
import com.weimob.mcloud.wechatwork.core.entity.relation.tag.CustomerTag;
import com.weimob.mcloud.wechatwork.core.entity.relation.tag.TagDetail;

import java.util.List;

/**
 * 企微客户标签关系相关
 *
 * @author lvjunlong
 */
public interface CustomerEmployeeTagService {

    /**
     * 添加员工&客户&标签
     *
     * @param privateSphere 企微唯一标识
     * @param externalUserId 腾讯客户id
     * @param orgUserId 企微助手员工id
     * @param tagIds 企微官方标签ids
     * @return
     */
    Boolean saveCustomerEmployeeTag(PrivateSphere privateSphere, String externalUserId, String orgUserId, List<String> tagIds);

    /**
     * 编辑员工&客户&标签
     *
     * @param privateSphere 企微唯一标识
     * @param externalUserId 腾讯客户id
     * @param orgUserId 企微助手员工id
     * @param tagIds 企微官方标签ids
     * @return
     */
    Boolean updateCustomerEmployeeTag(PrivateSphere privateSphere, String externalUserId, String orgUserId, List<String> tagIds);

    /**
     * 查询员工&客户&标签
     * externalUserId必传，如果传了orgUserId，则根据externalUserId、orgUserId查询
     *
     * @param privateSphere 企微唯一标识
     * @param externalUserId 腾讯客户id
     * @param orgUserId 企微助手员工id
     * @return
     */
    List<TagDetail> fetchCustomerEmployeeTag(PrivateSphere privateSphere, String externalUserId, String orgUserId, Boolean needFullInf);

    /**
     * 添加客户&标签,没有员工
     *
     * @param privateSphere 企微唯一标识
     * @param externalUserId 腾讯客户id
     * @param tagIds 企微官方标签ids
     * @return
     */
    Boolean saveCustomerTag(PrivateSphere privateSphere, String externalUserId, List<String> tagIds);

    /**
     * 编辑客户&标签,没有员工
     *
     * @param privateSphere 企微唯一标识
     * @param externalUserId 腾讯客户id
     * @param tagIds 企微官方标签ids
     * @return
     */
    Boolean updateCustomerTag(PrivateSphere privateSphere, String externalUserId, List<String> tagIds);


    CustomerTag getCustomerTag(PrivateSphere privateSphere, String externalUserId);

}
